import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {HttpClient} from '@angular/common/http';
import { MyinfoProvider} from "../../providers/myinfo/myinfo";
import {Myinfo} from "../../models/Myinfo"

//import {Config} from '../../provider/myinfo'

/**
 * Generated class for the MyInfoPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
    selector: 'page-my-info',
    templateUrl: 'my-info.html',
})
export class MyInfoPage {
    myinfo: Myinfo;
    constructor(public navCtrl: NavController,
                public navParams: NavParams,
                private http: HttpClient,
                private infoProd: MyinfoProvider) {}

    ionViewDidLoad() {
        this.infoProd.getData().subscribe((data) => {
            this.myinfo = <Myinfo>data;
        });
        console.log('ionViewDidLoad MyInfoPage');
    }


}
